package edu.pe.cayetano.ws;

public class WSPacienteProxy implements edu.pe.cayetano.ws.WSPaciente {
  private String _endpoint = null;
  private edu.pe.cayetano.ws.WSPaciente wSPaciente = null;
  
  public WSPacienteProxy() {
    _initWSPacienteProxy();
  }
  
  public WSPacienteProxy(String endpoint) {
    _endpoint = endpoint;
    _initWSPacienteProxy();
  }
  
  private void _initWSPacienteProxy() {
    try {
      wSPaciente = (new edu.pe.cayetano.ws.WSPacienteServiceLocator()).getWSPaciente();
      if (wSPaciente != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)wSPaciente)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
        else
          _endpoint = (String)((javax.xml.rpc.Stub)wSPaciente)._getProperty("javax.xml.rpc.service.endpoint.address");
      }
      
    }
    catch (javax.xml.rpc.ServiceException serviceException) {}
  }
  
  public String getEndpoint() {
    return _endpoint;
  }
  
  public void setEndpoint(String endpoint) {
    _endpoint = endpoint;
    if (wSPaciente != null)
      ((javax.xml.rpc.Stub)wSPaciente)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
    
  }
  
  public edu.pe.cayetano.ws.WSPaciente getWSPaciente() {
    if (wSPaciente == null)
      _initWSPacienteProxy();
    return wSPaciente;
  }
  
  public edu.pe.cayetano.ws.PacienteTO getPaciente(java.lang.String dni) throws java.rmi.RemoteException{
    if (wSPaciente == null)
      _initWSPacienteProxy();
    return wSPaciente.getPaciente(dni);
  }
  
  
}